MichaelK
08/10/2026, 11:22 AMmicrcx@micrcx-desktop:~/toit/ruuvi_ble$ jag run -d basic ruuvi_ble.toit
Scanning for device with name: 'basic'
Running 'ruuvi_ble.toit' on 'basic' ...
ruuvi_ble.toit:31:35: warning: Deprecated 'AdvertisementData.manufacturer-data'. Use 'Advertisement.manufacturer-specific' instead
md/ByteArray := device.data.manufacturer-data
^~~~~~~~~~~~~~~~~
Success: Sent 78KB code to 'basic' in 2.92s
manufacturer-data was replaced with manufacturer-specific, but now a compilation error occurs:
micrcx@micrcx-desktop:~/toit/ruuvi_ble$ jag run -d basic ruuvi_ble.toit
Scanning for device with name: 'basic'
Running 'ruuvi_ble.toit' on 'basic' ...
ruuvi_ble.toit:31:35: error: Argument mismatch for 'AdvertisementData.manufacturer-specific'
Block argument not provided
md/ByteArray := device.data.manufacturer-specific
^~~~~~~~~~~~~~~~~~~~~
Compilation failed
I've use Jaguar v1.69.0 with Toit SDK v2.0.0-alpha.196.floitsch
08/10/2026, 11:26 AMMichaelK
08/11/2026, 6:43 AMstart-scan :
scan-task = task::
print "BLE device '$DEVICE_NAME' monitoring has started"
adapter.central.scan : | device/ble.RemoteScannedDevice |
md/ByteArray := device.data.manufacturer-data
parseRuuvi md
Regards, Mkfloitsch
08/11/2026, 10:37 AMmanufacturer-specific now takes a block.
I haven't tested this, but I think you can just concatenate the company-id and data again:
md/ByteArray := device.data.manufacturer-specific: | company-id data |
company-id + data // This is the result of the RHS expression.
If you only need the data, but not the company-id, you can just use that:
md/ByteArray := device.data.manufacturer-specific: | _ data |
data // This is the result of the RHS expression.MichaelK
08/11/2026, 11:05 AMfloitsch
08/11/2026, 11:07 AMmanufacturer-specific. I updated my responseMichaelK
08/11/2026, 11:40 AMstart-scan :
scan-task = task::
print "BLE device '$DEVICE_NAME' monitoring has started"
adapter.central.scan : | device/ble.RemoteScannedDevice |
md/ByteArray? := device.data.manufacturer-specific: | company-id data | company-id + data
parseRuuvi md
And also need to process this possible null in the parseRuuvi function:
parseRuuvi md/ByteArray? -> none :
if not md :
return
... & etc
Thanks anyway.